package com.itheima.mapper;

import com.itheima.pojo.Catemater;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CatematerMapper {

    @Results({@Result(property = "parenId", column = "parent_id")})
    @Select("select id, name,sort,parent_id from category order by sort asc")
    List<Catemater> all();




}
